
/*****************************************************************************
 *
 * 作   者: 陈睿 * 创建时间: 2022/11/23 16:38:06 *
 * Copyright (C) 2008 - 鹏业软件公司
 *
 *****************************************************************************/

import {DataPacket, NorDataList} from 'pengesoft-ng-lib';

/**
 * 报销申请
 */
export class ReimsementApply extends DataPacket {
  Id: string; // 报销申请编号
  EmployeeId: string; // 报销申请人
  EmployeeName: string; // 报销人名字
  State: number; // 申请状态(1审核中，2审核未通过，3 审核通过)
  TotalMoney: number; // 报销总金额
  Remark: string; // 备注
  CreateTime: Date|undefined; // 申请日期
  EndTime: Date|undefined; // 报销日期
  ActualMoney: number; // 实际报销金额
  UpdateTime: Date|undefined; // 修改时间

  constructor(options: Partial<ReimsementApply> = {}) {
    super();
    this.Id = options.Id || '';
    this.EmployeeId = options.EmployeeId || '';
    this.EmployeeName = options.EmployeeName || '';
    this.State = !options.State ? 0 : Number.parseFloat(options.State.toString());
    this.TotalMoney = !options.TotalMoney ? 0 : Number.parseFloat(options.TotalMoney.toString());
    this.Remark = options.Remark || '';
    this.CreateTime = this.newDate(options.CreateTime);
    this.EndTime = this.newDate(options.EndTime);
    this.ActualMoney = !options.ActualMoney ? 0 : Number.parseFloat(options.ActualMoney.toString());
    this.UpdateTime = this.newDate(options.UpdateTime);
  }
}

/**
 * 报销申请列表
 */
export class ReimsementApplyList extends NorDataList<ReimsementApply> {

  constructor(options: Partial<ReimsementApplyList> | Array<ReimsementApply> = {}) {
    super(options, ReimsementApply);
  }
}

